<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="style.css">
    <title>圆形背景动效多选框</title>
    <style>
        .app {
            width: 100%;
            height: 100vh;
            background-color: #ffffff;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .label66 {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .check-inp66 {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            position: absolute;
            background-color: rgba(0, 0, 0, 0.06);
            z-index: 1;
            transform: scale(1);
            transition: transform 0.15s linear;
            appearance: none;
            /* none时可以自定义其外观 */
        }

        .span66 {
            width: 20px;
            height: 20px;
            display: block;
            position: absolute;
            z-index: 2;
            cursor: pointer;
        }

        .span66::before {
            content: '';
            width: 20px;
            height: 20px;
            border: 2px solid rgba(0, 0, 0, 0.6);
            border-radius: 3px;
            box-sizing: border-box;
            display: block;
            position: absolute;
            transition: all 0.3s linear;
        }

        .span66::after {
            content: "";
            width: 10px;
            height: 5px;
            display: block;
            position: absolute;
            top: 5px;
            left: 4px;
            border: solid 2px transparent;
            border-right: none;
            border-top: none;
            transform: rotate(-45deg);
            transition: border-color 0.3s linear;
        }

        .label66:hover .span66::before {
            border-color: #0093E9;
        }

        .label66:active .check-inp66,
        .label66:active .check-inp66:checked {
            transform: scale(0);
            transition: transform 0.15s linear;
        }

        .check-inp66:checked {
            background-color: rgba(0, 147, 233, 0.08);
        }

        .check-inp66:checked~.span66::before {
            background-color: #0093E9;
            border-color: #0093E9;
        }

        .check-inp66:checked~.span66::after {
            border-color: #ffffff;
        }
    </style>
</head>

<body>
    <div class="app">
        <label class="label66">
            <input type="checkbox" class="check-inp66">
            <span class="span66"></span>
        </label>
    </div>
</body>

</html>